package com.shuang.common.util;

import java.io.Serializable;

/**
 * 异步请求返回包装类
 * @author shuang
 *
 */
public class ResultJsonProtocol implements Serializable{
	
	private static final long serialVersionUID = 1L;
	/**
	 * 请求状态
	 */
	private boolean status;
	/**
	 * 请求数据实体
	 */
	private Object obj;
	/**
	 * 标题
	 */
	private String title;
	/**
	 * 请求状态码
	 */
	private Object status_code;
	
	public ResultJsonProtocol() {
	}
	
	public ResultJsonProtocol(boolean status, Object obj, String title, Object status_code) {
		this.status = status;
		this.obj = obj;
		this.title = title;
		this.status_code = status_code;
	}
	/**
	 * 返回结果方法
	 * @param status
	 * @param obj
	 * @param title
	 * @param status_code
	 * @return
	 */
	public static ResultJsonProtocol getResultInfo(boolean status, Object obj, String title, Object status_code) {
		ResultJsonProtocol resultInfo=new ResultJsonProtocol(status, obj, title, status_code);
		return resultInfo;
	}
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public Object getObj() {
		return obj;
	}
	public void setObj(Object obj) {
		this.obj = obj;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Object getStatus_code() {
		return status_code;
	}
	public void setStatus_code(Object status_code) {
		this.status_code = status_code;
	}
	@Override
	public String toString() {
		return "ResultInfo [status=" + status + ", obj=" + obj + ", title="
				+ title + ", status_code=" + status_code + "]";
	}
	
	
}
